Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ZKChain: Consensus Decentralization merged fixes #1054

Open
wants to merge 9 commits into
base: consensus-fix-review
Choose a base branch
from

Conversation

Raid5594
Copy link
Collaborator

What ❔

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

Copy link

github-actions bot commented Oct 30, 2024

Changes to gas cost

Generated at commit: ac859f62ed84144f1a44e0047ac9d3a0f74cd4e0, compared to commit: 663e56d07fe1e50a25347f6bff6c34848914978d

🧾 Summary (100% most significant diffs)

Contract Method Avg (+/-) %
DummyBridgehubSetter createNewChain
requestL2TransactionDirect
requestL2TransactionTwoBridges
setAddresses
+974 ❌
+1,833 ❌
-128 ✅
0 ➖
+0.92%
+1.54%
-0.08%
0.00%
DiamondProxy finalizeEthWithdrawal
requestL2Transaction
+497 ❌
+4 ❌
+0.63%
+0.00%
TransparentUpgradeableProxy setAllowedData -22 ✅ -0.04%
MerkleTest calculateRoot(bytes32[],uint256,bytes32) -1 ✅ -0.03%
TestnetERC20Token transfer +15 ❌ +0.03%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
DummyBridgehubSetter 4,350,895 (0) addChainTypeManager
createNewChain
proveL1ToL2TransactionStatus
proveL2LogInclusion
proveL2MessageInclusion
removeChainTypeManager
requestL2TransactionDirect
requestL2TransactionTwoBridges
setAddresses
setPendingAdmin
23,895 (0)
28,757 (-864)
0 (0)
0 (0)
0 (0)
23,854 (0)
33,020 (0)
31,035 (0)
24,370 (+12)
25,999 (0)
0.00%
-2.92%
+∞%
+∞%
+∞%
0.00%
0.00%
0.00%
+0.05%
0.00%
44,148 (-1)
107,355 (+974)
1,394 (+23)
1,510 (-3)
1,604 (-6)
25,487 (-5)
120,806 (+1,833)
151,409 (-128)
66,087 (0)
47,721 (+2)
-0.00%
+0.92%
+1.68%
-0.20%
-0.37%
-0.02%
+1.54%
-0.08%
0.00%
+0.00%
47,621 (0)
36,509 (+6)
988 (+3)
1,100 (-3)
1,191 (0)
25,854 (0)
97,466 (+784)
47,057 (-11,780)
71,227 (0)
49,885 (0)
0.00%
+0.02%
+0.30%
-0.27%
0.00%
0.00%
+0.81%
-20.02%
0.00%
0.00%
47,621 (0)
881,476 (+5,053)
3,639 (0)
3,873 (0)
4,055 (0)
26,266 (0)
300,389 (+63)
434,706 (+12)
91,367 (0)
49,897 (0)
0.00%
+0.58%
0.00%
0.00%
0.00%
0.00%
+0.02%
+0.00%
0.00%
0.00%
6,656 (0)
2,560 (0)
512 (0)
512 (0)
512 (0)
2,048 (0)
1,024 (0)
1,536 (+1)
3,328 (0)
4,864 (0)
MailboxFacet 2,681,325 (0) finalizeEthWithdrawal 8,251 (0) 0.00% 52,191 (+493) +0.95% 52,735 (0) 0.00% 52,735 (0) 0.00% 257 (0)
DiamondProxy 2,405,277 (0) finalizeEthWithdrawal
requestL2Transaction
util_setChainId
37,779 (0)
33,295 (0)
28,944 (0)
0.00%
0.00%
0.00%
79,515 (+497)
131,440 (+4)
33,793 (-12)
+0.63%
+0.00%
-0.04%
79,991 (+24)
170,024 (-12)
33,756 (0)
+0.03%
-0.01%
0.00%
80,291 (0)
191,977 (0)
34,128 (0)
0.00%
0.00%
0.00%
257 (0)
771 (0)
519 (0)
ChainAdmin 835,016 (0) setUpgradeTimestamp 25,361 (0) 0.00% 45,079 (+230) +0.51% 45,333 (0) 0.00% 45,645 (0) 0.00% 256 (0)
TransparentUpgradeableProxy 644,397 (0) setAllowedAdminImplementation
setAllowedData
setSelectorShouldBeValidated
54,675 (0)
55,405 (0)
54,726 (0)
0.00%
0.00%
0.00%
54,912 (-25)
56,423 (-22)
54,755 (-1)
-0.05%
-0.04%
-0.00%
55,047 (0)
56,026 (-36)
54,774 (0)
0.00%
-0.06%
0.00%
55,047 (0)
58,225 (0)
54,774 (0)
0.00%
0.00%
0.00%
258 (0)
257 (0)
258 (0)
TestPermanentRestriction 1,450,178 (0) setAllowedData 26,796 (0) 0.00% 27,225 (-12) -0.04% 27,067 (0) 0.00% 27,880 (0) 0.00% 257 (0)
MerkleTest 436,733 (0) calculateRoot(bytes32[],uint256,bytes32) 571 (0) 0.00% 2,930 (-1) -0.03% 2,982 (0) 0.00% 3,026 (-11) -0.36% 265 (0)
TestnetERC20Token 640,427 (0) approve
mint
transfer
24,272 (0)
34,031 (0)
46,377 (0)
0.00%
0.00%
0.00%
46,255 (-1)
61,795 (-1)
46,733 (+15)
-0.00%
-0.00%
+0.03%
46,220 (0)
68,255 (0)
46,689 (+36)
0.00%
0.00%
+0.08%
46,568 (0)
68,615 (0)
46,977 (0)
0.00%
0.00%
0.00%
1,527 (0)
1,704 (0)
257 (0)
AccessControlRestriction 1,357,213 (0) grantRole
setRequiredRoleForCall
setRequiredRoleForFallback
51,277 (0)
24,360 (0)
24,219 (0)
0.00%
0.00%
0.00%
51,516 (-4)
45,737 (+3)
45,245 (-4)
-0.01%
+0.01%
-0.01%
51,649 (0)
49,094 (0)
48,444 (0)
0.00%
0.00%
0.00%
51,649 (0)
54,114 (0)
53,925 (0)
0.00%
0.00%
0.00%
1,024 (0)
1,536 (0)
1,536 (0)
MerkleTreeNoSort 534,636 (0) getProof 2,594 (0) 0.00% 32,739 (+2) +0.01% 33,193 (0) 0.00% 33,215 (0) 0.00% 277 (0)
L1NativeTokenVault 3,438,536 (0) bridgeBurn 12,799 (0) 0.00% 89,770 (-4) -0.00% 106,025 (0) 0.00% 106,025 (0) 0.00% 1,299 (0)

@Raid5594 Raid5594 force-pushed the ra/consensus-review-merged-fixes branch from ee5b304 to 4b829bb Compare October 31, 2024 13:27
@Raid5594 Raid5594 force-pushed the ra/consensus-review-merged-fixes branch from 4b829bb to 9763804 Compare October 31, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant